"""
题目1
要求:
定义一个学生类
属性包含学生姓名,学号,以及语数英三科的成绩
能够设置学生科目的成绩
能够打印出该学生的所有科目成绩
"""


class Student:
    def __init__(self, name, index, language, maths, english):
        self.name = name;
        self.index = index;
        self.language = language;
        self.maths = maths;
        self.english = english

    def setName(self, name):
        self.name = name

    def setIndex(self, index):
        self.index = index

    def setLanguage(self, language):
        self.language = language

    def setMaths(self, maths):
        self.maths = maths

    def setEngLish(self, english):
        self.english = english;

    def printLanguage(self):
        print(self.language)

    def printMaths(self):
        print(self.maths)

    def printEnglish(self):
        print(self.english)

    def printSubject(self):
        self.printLanguage()
        self.printMaths()
        self.printEnglish()


# 创建一个学生类的对象
student1 = Student("小明", 4, 87, 98, 75)

# 打印对应的属性成员
print(student1.name)

# 修改对应的属性成员
student1.name = "小红"

# 打印修改过后的属性成员
print(student1.name)

# 调用对应方法
student1.setLanguage(100)

